#ifndef __TIMER_H
#define __TIMER_H

#ifdef WIN32
#include <windows.h>

typedef struct {
    LARGE_INTEGER start;
    LARGE_INTEGER stop;
} stopWatch;

class timer {

private:
	timer t;
	LARGE_INTEGER frequency;
	double LIToSecs( LARGE_INTEGER & L);
public:
	timer();
	void startTimer( );
	void stopTimer( );
	double getElapsedTime();
};

#else
#include <sys/time.h>

typedef struct {
	timeval start;
	timeval stop;
} tstruct;

class timer {

private:
	tstruct t;
public:
	timer() {};
	void startTimer( );
	void stopTimer( );
	double getElapsedTime();
};

#endif

#endif
